﻿using System;
using System.Collections.Generic;

using Caliburn.Micro;


namespace DailyFx.UI
{
	public class ChartManager : Conductor<ICanvas>.Collection.OneActive, IChartManager
	{
		protected ChartManager()
		{ 
		}


		public IObservableCollection<ICanvas> Canvus
		{
			get { return this.Items; }
		}

		public ICanvas Canvas
		{
			get { return this.ActiveItem; }
		}


		/// <summary>
		///		Appends a new canvas .
		/// </summary>
		public virtual void ApplyCanvas ( ICanvas canvas )
		{
			// Adds it to the list .
			this.Canvus.Add( canvas);
			// and make the newly added canvas current .
			this.ActivateItem ( canvas);
		}

		/// <summary>
		///		Removes the specified canvas .
		/// </summary>
		public virtual void DestroyCanvas ( ICanvas canvas )
		{
		}
	}
}
